From: Jonas Dreßler Date: Mon, 6 Apr 2020 18:28:00 +0000 (+0200) Subject: shell-window-tracker: Detect invalid PID values of 0 X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~520 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4aee87a31b1f73ef6f5a7f3928e54d336bc37f02;p=gnome-shell.git shell-window-tracker: Detect invalid PID values of 0 MetaWindows get_pid() API changed to use the client PID, which also works for Wayland clients instead of only X11 clients now. This API returns 0 instead of -1 for invalid PIDs, so update our check according to that. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1184 --- diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index 075cb2a16..99ed8270c 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -343,7 +343,7 @@ get_app_from_window_pid (ShellWindowTracker *tracker, pid = meta_window_get_pid (window); - if (pid == -1) + if (pid < 1) return NULL; result = shell_window_tracker_get_app_from_pid (tracker, pid);